home *** CD-ROM | disk | FTP | other *** search
-
-
- /*
- ** ***********************************************************************
- **
- ** ScanHandlerClass (c) by Stefan Schor
- **
- ** ***********************************************************************
- */
-
-
- #include <exec/types.h>
-
- #define UPPER(a) ((a) & 95)
-
- __asm
- ULONG
- ScanHandlerClass(register __d0 ULONG len, register __a0 char **text)
- {
- const char *version = "$VER: Class 1.0 (24.3.94)";
-
- if (len > 6)
- {
- char *pos = *text;
- char *last = *text + len -1;
-
- if ( *pos++ == 'c'
- && *pos++ == 'l'
- && *pos++ == 'a'
- && *pos++ == 's'
- && *pos++ == 's'
- && *pos == ' ' )
- {
- while (pos < last && *++pos == ' '); /* Alle Spaces übergehen */
-
- *text = pos; /* Hier beginnt der Text */
-
- while (pos < last && *++pos != ' '); /* Bis zum nächsten Space */
-
- if (*pos == ' ')
- return ((ULONG)pos - (ULONG)*text); /* Länge zurück */
- else
- return ((ULONG)pos - (ULONG)*text + 1); /* Länge zurück */
-
- }
- }
-
-
-
- return 0;
- }
-